package poc.spring.services.tests;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

import org.apache.log4j.Logger;
import org.junit.Test;

import poc.bcsoi.utils.DateUtils;

public class DateUtilsTester {

	private Logger	log	= Logger.getLogger(this.getClass());

	public DateUtilsTester() {
	}

	@Test
	public void testDateParser() {
		log.info("Java.Util.Date Parser  =================================");
		
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
		TimeZone tz = TimeZone.getTimeZone("UTC-04:00");
		sdf.setTimeZone(tz);
		String dateString = "2010-10-19T17:25:30.432-04:00";

		Date gc = DateUtils.convertStringToDate(dateString);
		System.out.println("Date: " + sdf.format(gc));

	}
}
